package com.atguigu.constructor;

public class Goods {
    public int id;
    public String name;
    public double price;
    public int stock;
    public String date;

    public Goods() {
        System.out.println("一个商品对象被创建了");
    }

    public Goods(int id, String name, double price) {
        this();
        this.id = id;
        this.name = name;
        this.price = price;
    }

    public Goods(int id, String name, double price, int stock, String date) {
//        this.id = id;
//        this.name = name;
//        this.price = price;
        this(id,name,price);
        this.stock = stock;
        this.date = date;
    }
}
